package com.neoCalf.neoCommon.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;


/**
 * Description 会话表
 * date 2024-10-06 11:39:18
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("session")
public class Session implements Serializable {
    /**
     * 用户ID
     */
    @TableId(value = "user_id")
    private String userId;
    /**
     * 联系人ID
     */
    private String contactId;
    /**
     * 会话ID
     */
    private String sessionId;
    /**
     * 联系人名称
     */
    private String contactName;
    /**
     * 最后一次聊天
     */
    @TableField(exist = false)
    private ChatSession chatSession;

    public Session(String userId, String contactId, String sessionId, String contactName) {
        this.userId = userId;
        this.contactId = contactId;
        this.sessionId = sessionId;
        this.contactName = contactName;
    }
}